import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from './nav/index/home' //主页首页
import Course from './nav/index/course' //主页课程
import MyClass from './nav/index/myclass' //主页我的课程

import Login from './nav/login/login'
import StudentLogin from './nav/login/studentLogin'
import TeacherLogin from './nav/login/teacherLogin'
import Logup from './nav/login/logup'

//详情页
import Details from './nav/detailspage/details'
import Learn from './nav/detailspage/learn'
import Myset from './nav/detailspage/myset'

//考试
import Work from './nav/index/work'

import TeacherIndex from './nav/teacher/index'
import TeacherCourse from './nav/teacher/teachercourse'
import TeacherWork from './nav/teacher/work'
import Teacherset from './nav/teacher/teacherset'




Vue.use(VueRouter)

const routes = [
  // {
  //   //首页
  //   path: '/',
  //   name: 'home',
  //   component: Home
  // },
  // {
  //   //课程页
  //   path: '/course',
  //   name: 'course',
  //   component: () => import(/* webpackChunkName: "course" */ '../views/Course.vue')
  // },
  // {
  //   //登录页
  //   path: '/login',
  //   name: 'login',
  //   component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue')
  // },
  // {
  //   //我的课程页
  //   path: '/myclass',
  //   name: 'myclass',
  //   component: () => import(/* webpackChunkName: "myclass" */ '../views/Myclass.vue')
  // },
  Home,
  Course,
  MyClass,
  StudentLogin,
  TeacherLogin,
  Logup,
  Login,
  Details,
  Learn,
  Myset,
  Work,
  TeacherIndex,
  TeacherWork,
  TeacherCourse,
  Teacherset
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
